#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    void openPort();
    void searchSerial();
    void sendData(QString str);

public slots:
    void receiveInfo();

private slots:
    void on_searchBtn_clicked();

    void on_openBtn_clicked();

    void on_cleanBtn_clicked();

    void on_sendBtn_1_clicked();

    void on_sendBtn_2_clicked();

private:
    Ui::MainWindow *ui;

    QSerialPort * m_serialPort;
};

#endif // MAINWINDOW_H
